"""
@release: fsray-api-alpha
@file: user.schemas.py
@author: lingdubing
@desc: 用户业务模型约束
@character: utf-8
"""

from pydantic import Field, BaseModel
from sqlalchemy import JSON, Column

class MachinePaingtionModel(BaseModel):
    page: int = Field(1, description="页码")
    page_size: int = Field(10, description="每页数量")
    machine_id : str | None = Field(None, description="电动车编号")
    status: int | None = Field(None, description="电动车状态")
    area_id: str | None = Field(None, description="区域编号")

class AddMachineModel(BaseModel):
    machine_point: dict | None = Field(default=None, description="电动车位置", sa_column=Column(JSON))

class RideMachineModel(BaseModel):
    machine_id: str | None = Field(default=None, description="电动车编号，电动车的唯一标识")
    machine_origin: dict | None = Field(default=None, description="电动车起始位置", sa_column=Column(JSON))
    machine_destination: dict | None = Field(default=None, description="电动车终点位置", sa_column=Column(JSON))
